|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.caucho.http.security.AuthenticatorAdapter
Adapter for old-style authentication.
| Constructor Summary | |
AuthenticatorAdapter(Authenticator auth,
RegistryNode registry,
Application app)
|
|
| Method Summary | |
java.security.Principal |
getUserPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
Gets the authenticated user for the current request. |
void |
init()
Initialize the authenticator. |
boolean |
isUserInRole(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal user,
java.lang.String role)
Returns true if the user plays the named role. |
java.security.Principal |
login(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.lang.String user,
java.lang.String password)
Logs a user in with a user name and a password. |
java.security.Principal |
loginDigest(HttpServletRequest request,
HttpServletResponse response,
ServletContext app,
java.lang.String user,
java.lang.String realm,
java.lang.String nonce,
java.lang.String uri,
java.lang.String qop,
java.lang.String nc,
java.lang.String cnonce,
byte[] clientDigest)
Returns the digest secret for Digest authentication. |
void |
logout(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal user)
Logs the user out from the given request. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AuthenticatorAdapter(Authenticator auth,
RegistryNode registry,
Application app)
| Method Detail |
public void init()
throws ServletException
init in interface ServletAuthenticator
public java.security.Principal login(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.lang.String user,
java.lang.String password)
throws ServletException
login in interface ServletAuthenticatorrequest - servlet requestresponse - servlet response, in case any cookie need sending.application - servlet applicationuser - the user name.password - the user's presented password.
public java.security.Principal loginDigest(HttpServletRequest request,
HttpServletResponse response,
ServletContext app,
java.lang.String user,
java.lang.String realm,
java.lang.String nonce,
java.lang.String uri,
java.lang.String qop,
java.lang.String nc,
java.lang.String cnonce,
byte[] clientDigest)
throws ServletException
ServletAuthenticator
A1 = MD5(username + ':' + realm + ':' + password)
A2 = MD5(method + ':' + uri)
digest = MD5(A1 + ':' + nonce + A2)
loginDigest in interface ServletAuthenticatorcom.caucho.http.security.ServletAuthenticatorrequest - the request trying to authenticate.response - the response for setting headers and cookies.application - the servlet contextusername - the usernamerealm - the realm
public java.security.Principal getUserPrincipal(HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
throws ServletException
getUserPrincipal in interface ServletAuthenticatorrequest - the request trying to authenticate.application - the servlet context
public boolean isUserInRole(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal user,
java.lang.String role)
throws ServletException
isUserInRole in interface ServletAuthenticatorrequest - the request testing the role.user - the user's Principal.role - role name.
public void logout(HttpServletRequest request,
HttpServletResponse response,
ServletContext application,
java.security.Principal user)
throws ServletException
Generally only called from user code.
logout in interface ServletAuthenticator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||